package com.stlm2.dems.dao.impl;

import org.springframework.stereotype.Repository;

import com.stlm2.dems.entity.PriceRecord;
import com.stlm2.dems.dao.PriceRecordDao;
import com.stlm2.core.base.impl.BaseDaoImpl;

import java.util.HashMap;
import java.util.Map;

@Repository("priceRecordDao")
public class PriceRecordDaoImpl extends BaseDaoImpl<PriceRecord> implements PriceRecordDao {

    @Override
    public PriceRecord getRecentlyOne(PriceRecord priceRecord) {
        Map<String,Object> map=new HashMap<String, Object>();
        map.put("goodsId",priceRecord.getGoodsId());
        map.put("speciflcationId",priceRecord.getSpeciflcationId()!=null?priceRecord.getSpeciflcationId():0);
        return selectOne("getRecentlyOne",map);
    }
}